﻿<UserControl x:Class="CalculatorProject.View.InputButtonsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:converter="clr-namespace:CalculatorProject"
             mc:Ignorable="d" MinHeight="155" MinWidth="245" Focusable="True" FocusManager.FocusedElement="{Binding ElementName=InputButtonGrid}">

   
    
    <Grid Name="InputButtonGrid" Focusable="True">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>


    <!-- Numbers-->
        <!-- 1 -->
        <Button Content="1" Grid.Column="0" Grid.Row="1" Command="{Binding Path=InputButtonCommand}" CommandParameter="1"  MinHeight="30" MinWidth="40" Name="BtnNumber1" Focusable="False" />

        <!-- 2 -->
        <Button Content="2" Grid.Column="1" Grid.Row="1" Command="{Binding Path=InputButtonCommand}" CommandParameter="2" MinHeight="30" MinWidth="40" Name="BtnNumber2" Focusable="False" />

        <!-- 3 -->
        <Button Content="3" Grid.Column="2" Grid.Row="1" Command="{Binding Path=InputButtonCommand}" CommandParameter="3" MinHeight="30" MinWidth="40" Name="BtnNumber3" Focusable="False" />

        <!-- 4 -->
        <Button Content="4" Grid.Column="0" Grid.Row="2" Command="{Binding Path=InputButtonCommand}" CommandParameter="4" MinHeight="30" MinWidth="40" Name="BtnNumber4" Focusable="False" />

        <!-- 5 -->
        <Button Content="5" Grid.Column="1" Grid.Row="2" Command="{Binding Path=InputButtonCommand}" CommandParameter="5" MinHeight="30" MinWidth="40" Name="BtnNumber5" Focusable="False" />
        
        <!-- 6 -->
        <Button Content="6" Grid.Column="2" Grid.Row="2" Command="{Binding Path=InputButtonCommand}" CommandParameter="6" MinHeight="30" MinWidth="40" Name="BtnNumber6" Focusable="False" />

        <!-- 7 -->
        <Button Content="7" Grid.Column="0" Grid.Row="3" Command="{Binding Path=InputButtonCommand}" CommandParameter="7" MinHeight="30" MinWidth="40" Name="BtnNumber7" Focusable="False" />

        <!-- 8 -->
        <Button Content="8" Grid.Column="1" Grid.Row="3" Command="{Binding Path=InputButtonCommand}" CommandParameter="8" MinHeight="30" MinWidth="40" Name="BtnNumber8" Focusable="False" />

        <!-- 9 -->
        <Button Content="9" Grid.Column="2" Grid.Row="3" Command="{Binding Path=InputButtonCommand}" CommandParameter="9" MinHeight="30" MinWidth="40" Name="BtnNumber9" Focusable="False" />

        <!-- 0 -->
        <Button Content="0" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2" Command="{Binding Path=InputButtonCommand}" CommandParameter="0" MinHeight="30" MinWidth="80" Name="BtnNumber0" Focusable="False" />


    <!-- Operators -->
        <!-- Add -->
        <Button Content="+" Grid.Column="3" Grid.Row="0" Command="{Binding Path=InputButtonCommand}" CommandParameter="+" MinHeight="30" MinWidth="40" Name="BtnOperAdd" Focusable="False" />

        <!-- Subtract -->
        <Button Content="-" Grid.Column="3" Grid.Row="1" Command="{Binding Path=InputButtonCommand}" CommandParameter="-" MinHeight="30" MinWidth="40" Name="BtnOperSub" Focusable="False" />

        <!-- Multiply -->
        <Button Content="*" Grid.Column="3" Grid.Row="2" Command="{Binding Path=InputButtonCommand}" CommandParameter="*" MinHeight="30" MinWidth="40" Name="BtnOperMult" Focusable="False" />

        <!-- Divide -->
        <Button Content="/" Grid.Column="3" Grid.Row="3" Command="{Binding Path=InputButtonCommand}" CommandParameter="/" MinHeight="30" MinWidth="40" Name="BtnOperDiv" Focusable="False" />

        <!-- Decimal Point -->
        <Button Content="." Grid.Column="2" Grid.Row="4" Command="{Binding Path=InputButtonCommand}" CommandParameter="." MinHeight="30" MinWidth="40" Name="BtnDecimal" Focusable="False" />

        <!-- Negative -->
        <Button Content="+/-" Grid.Column="3" Grid.Row="4" Command="{Binding Path=InputButtonCommand}" CommandParameter="negative" MinHeight="30" MinWidth="40" Name="BtnNegative" Focusable="False" />

        <!-- Percent -->
        <Button Content="%" Grid.Column="4" Grid.Row="0" Command="{Binding Path=InputButtonCommand}" CommandParameter="%" MinHeight="30" MinWidth="40" Name="BtnPercent" Focusable="False" />

        <!-- Pi (π) -->
        <Button Content="π" Grid.Column="5" Grid.Row="3" Command="{Binding Path=InputButtonCommand}" CommandParameter="π" MinHeight="30" MinWidth="40" Name="BtnPi" Focusable="False" />
        
        <!-- e -->
        <Button Content="e" Grid.Column="5" Grid.Row="4" Command="{Binding Path=InputButtonCommand}" CommandParameter="e" MinHeight="30" MinWidth="40" Name="BtnE" Focusable="False" />

        <!-- Squared -->
        <Button Content="x²" Grid.Column="4" Grid.Row="1" Command="{Binding Path=InputButtonCommand}" CommandParameter="²" MinHeight="30" MinWidth="40" Name="BtnSquared" Focusable="False" />

        <!-- Square Root -->
        <Button Content="√" Grid.Column="4" Grid.Row="2" Command="{Binding Path=InputButtonCommand}" CommandParameter="√" MinHeight="30" MinWidth="40" Name="BtnSqrt" Focusable="False" />
        
        <!-- Factorial -->
        <Button Content="n!" Grid.Column="2" Grid.Row="0" Command="{Binding Path=InputButtonCommand}" CommandParameter="!" MinHeight="30" MinWidth="40" Name="BtnFactoral" Focusable="False" />

        <!-- Left Parenthesis -->
        <Button Content="(" Grid.Column="0" Grid.Row="0" Command="{Binding Path=InputButtonCommand}" CommandParameter="(" MinHeight="30" MinWidth="40" Name="BtnLeftPar" Focusable="False" />
        
        <!-- Right Parenthesis -->
        <Button Content=")" Grid.Column="1" Grid.Row="0" Command="{Binding Path=InputButtonCommand}" CommandParameter=")" MinHeight="30" MinWidth="40" Name="BtnRightPar" Focusable="False" />
        
        <!-- Equals -->
        <Button Content="=" Grid.Column="4" Grid.Row="3" Grid.RowSpan="2" Command="{Binding Path=InputButtonCommand}" CommandParameter="=" MinHeight="60" MinWidth="40" Name="BtnOperEqual" Focusable="False" />        
        <!-- Backspace -->
        <Button Content="←" Grid.Column="5" Grid.Row="2" Command="{Binding Path=InputButtonCommand}" CommandParameter="←" MinHeight="30" MinWidth="40" Name="BtnDelete" Focusable="False" />

        <!-- Clear -->
        <Button Content="Clr" Grid.Column="5" Grid.Row="0" Grid.RowSpan="2" Command="{Binding Path=InputButtonCommand}" CommandParameter="Clr" MinHeight="60" MinWidth="40" Name="BtnClr" Focusable="False" />
    </Grid>
</UserControl>
